<%@ page language="java" import="java.util.*,Bean.Student" pageEncoding="utf-8"%>
<html>
  <head>
   	<title>学生信息管理</title>
   	<style type="text/css">
   		a{
   			text-decoration: none;
   			color: red;
   		}
   	</style>
  </head>
  
  <body background="${pageContext.request.contextPath}/image/student.png" style=" background-repeat:no-repeat ;background-size:100% 100%;
		background-attachment: fixed;">
	<%
			ArrayList studentList = (ArrayList)request.getAttribute("studentList");
			
	%>
	<br>
	<div align="center" style="margin:20px auto; ">
		<form action="ShowAllStudentServlet" method="post">
  		<font size="4">学号：</font><input type="text" name="stuid">
  			<input type="submit" value="查询">
  		</form>
	</div>
	<p align="center">
		<a href="/stu_info_manage_sys/addStudent.jsp" style="color: black;"><font size="5">添加学生</font> </a>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  	<a href="/stu_info_manage_sys/index.jsp" style="color: black;"><font size="5">返回首页</font></a>
	</p><br>
	<hr><br><br>
  	<div align="center">
  		<table border="1" width="50%" >
		<tr align="center">
			<td>学号</td>
			<td>姓名</td>
			<td>性别</td>
			<td>年龄</td>
			<td>班级</td>
			<td>数据操作</td>
			<td>数据操作</td>
		</tr>
		<%
			for(int i = 0;i<studentList.size();i++){
				Student student =(Student)studentList.get(i);
		 %>
		 <tr align="center">
		 	<td><%=student.getStuid()%></td>
		 	<td><%=student.getStuname()%></td>
		 	<td><%=student.getStusex()%></td>
		 	<td><%=student.getStuage()%></td>
		 	<td><%=student.getStuclass()%></td>
		 	<td> 
		 	<a href="/stu_info_manage_sys/updateStudent.jsp?stuid=<%=student.getStuid()%>
		 	&stuname=<%=student.getStuname()%>&stusex=<%=student.getStusex()%>
		 	&stuage=<%=student.getStuage()%>&stuclass=<%=student.getStuclass()%>">修改</a> </td>
		 	<td> <a href="/stu_info_manage_sys/servlet/DeleteStudentServlet?stuid=<%=student.getStuid()%>">删除</a> </td>
		 </tr>
		 <%
		 	}
		  %>
  		</table>
  	</div>
  	
  </body>
</html>
